package chapter04

import chisel3._

class ROM extends Module {
  val io = IO(new Bundle {
    val sel = Input(UInt(2.W))
    val out = Output(UInt(8.W))
  })
  val rom = VecInit(1.U, 2.U, 3.U, 4.U)
  io.out := rom(io.sel)
}